import { defineStore } from 'pinia'

interface userState {
  userInfo: { uid: string; name: string; avatar: string; token: string; power: string }
  //判断是否登录
  isLoginState: boolean
  //登录状态
  loginState: number
}
export const useUserStore = defineStore('userStore', {
  state: (): userState => ({
    userInfo: {
      uid: '',
      name: '',
      avatar: '',
      token: '',
      power: '',
    },
    isLoginState: false,
    loginState: 0,
  }),
  persist: true, 
  actions: {},
})
